package androidapp.firstapp;

import java.util.Vector;

import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.widget.Button;

public class FivePuzzles extends Nine_puzzles {
	
	
	/*ArrayList<Bitmap> chunkedImages;
	int blanknr;
	Button blankButton;
	Vector<Button> buttonVector;
	int[] game_array;
	int moveCount;
	BitmapDrawable removedFragment;
	int removedId;
	boolean isRunning;*/
	
	Button button50;
	Button button51;
	Button button52;
	Button button53;
	Button button54;
	Button button55;
	Button button56;
	Button button57;
	Button button58;
	Button button59;
	Button button510;
	Button button511;
	Button button512;
	Button button513;
	Button button514;
	Button button515;
	Button button516;
	Button button517;
	Button button518;
	Button button519;
	Button button520;
	Button button521;
	Button button522;
	Button button523;
	Button button524;

	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_five_puzzles);
		size = 5;
		Intent intent = getIntent();
		String imgFile = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);
		game_array = new int[size*size];
		moveCount = 0;
		int chunkNumbers = intent.getIntExtra("Chunks",size*size);
		splitImage(imgFile, chunkNumbers);
		 this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
			
		button50 = (Button) this.findViewById(R.id.button50 );
		button51 = (Button) this.findViewById(R.id.button51 );
		button52 = (Button) this.findViewById(R.id.button52 );
		button53 = (Button) this.findViewById(R.id.button53 );
		button54 = (Button) this.findViewById(R.id.button54 );
		button55 = (Button) this.findViewById(R.id.button55 );
		button56 = (Button) this.findViewById(R.id.button56 );
		button57 = (Button) this.findViewById(R.id.button57 );
		button58 = (Button) this.findViewById(R.id.button58 );
		button59 = (Button) this.findViewById(R.id.button59 );
		button510= (Button) this.findViewById(R.id.button510);
		button511= (Button) this.findViewById(R.id.button511);
		button512= (Button) this.findViewById(R.id.button512);
		button513= (Button) this.findViewById(R.id.button513);
		button514= (Button) this.findViewById(R.id.button514);
		button515= (Button) this.findViewById(R.id.button515);
		button516= (Button) this.findViewById(R.id.button516);
		button517= (Button) this.findViewById(R.id.button517);
		button518= (Button) this.findViewById(R.id.button518);
		button519= (Button) this.findViewById(R.id.button519);
		button520= (Button) this.findViewById(R.id.button520);
		button521= (Button) this.findViewById(R.id.button521);
		button522= (Button) this.findViewById(R.id.button522);
		button523= (Button) this.findViewById(R.id.button523);
		button524= (Button) this.findViewById(R.id.button524);

		buttonVector = new Vector<Button>();

		buttonVector.add(button50 );
		buttonVector.add(button51 );
		buttonVector.add(button52 );
		buttonVector.add(button53 );
		buttonVector.add(button54 );
		buttonVector.add(button55 );
		buttonVector.add(button56 );
		buttonVector.add(button57 );
		buttonVector.add(button58 );
		buttonVector.add(button59 );
		buttonVector.add(button510);
		buttonVector.add(button511);
		buttonVector.add(button512);
		buttonVector.add(button513);
		buttonVector.add(button514);
		buttonVector.add(button515);
		buttonVector.add(button516);
		buttonVector.add(button517);
		buttonVector.add(button518);
		buttonVector.add(button519);
		buttonVector.add(button520);
		buttonVector.add(button521);
		buttonVector.add(button522);
		buttonVector.add(button523);
		buttonVector.add(button524);
		
		showPreview();
		
		
		
		
	}
	
}
